package com.zdw.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zdw.demo.entity.WechatRefundHistory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * Mapper接口 : 用于与数据库进行实际交互。
 * 注意！！！Mapper这里不是一个类，而是一个接口。
 */
@Mapper
public interface WechatRefundHistoryMapper extends BaseMapper<WechatRefundHistory> {

    @Update("""
            update wechat_refund_history h
            set 
                h.refund_status = #{history.refund_status}
                ,h.update_time= #{history.update_time}
            where h.out_refund_no = #{history.out_refund_no}
            """)
    int updateStatus(@Param("history") WechatRefundHistory history);

}
